BeginUpdate
WindowPtr theWindow ; window you intend to update temporarily clips the window's visible region to that needing an update, and
purges that window's updateRgn.
theWindow is the window to update. It is normally obtained from the where
Notes: This saves a copy of theWindow 's visible region, then sets visRgn equal to the conjunction of the visRgn and updateRgn, thus preparing to restrict drawing to only those regions that are both visible and need an update.
Before making this call, you should save the current GrafPort (if necessary), and set theWindow to be the current GrafPort. After this call, you should draw the content region of the window, including any controls
that need to be drawn. It may be easiest to simply redraw the entire content
region since Quickdraw will clip all drawing to the restricted update region
automatically.
Finally, after finishing the re drawing, use EndUpdate and restore the Example
#include <Windows.h>
#include <Controls.h>
#include <ToolUtils.h>
/* ... after GetNextEvent() returns updateEvt for window myWin... */
UpdateMyWindow( myWin )
{
SetPort( myWin ); [TOKEN:12074] make mine the current one */ /* ... do whatever updating is needed -- redraw text, etc. ... */
}